﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Masterpage.Master"
    CodeBehind="Gallery.aspx.vb" Inherits="VintageCars.Gallery" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%">
        <tr>
            <td>
                Name
            </td>
            <td>
                <asp:TextBox ID="txtN" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Description
            </td>
            <td>
                <asp:TextBox ID="txtD" runat="server" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Upload Picture
            </td>
            <td>
                <asp:FileUpload ID="imgUpload" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
            </td>
        </tr>
    </table>
    <br />
    <%-- <asp:DataList ID="dlQLImages" runat="server" autogeneratecolumns="true" HorizontalAlign="Center">
        <ItemTemplate>
            <img id="Img1" src='<%# string.Format("~/Images/UserUploads/{0}", DataBinder.Eval(Container.DataItem,"Name")) %>'
                height="250" width="400" runat="server" />
        </ItemTemplate>
    </asp:DataList>--%>
    <div style="position: relative; vertical-align: top; height: 300px; overflow: auto;
        width: 1065px">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
            Width="1055px">
            <Columns>
                <asp:BoundField DataField="Veh_Name" HeaderText="Name" SortExpression="Veh_Name">
                    <HeaderStyle HorizontalAlign="Center" BackColor="Silver" ForeColor="Black" Font-Bold="True">
                    </HeaderStyle>
                </asp:BoundField>
                <asp:BoundField DataField="Veh_Description" HeaderText="Description" SortExpression="Veh_Description">
                    <HeaderStyle HorizontalAlign="Center" BackColor="Silver" ForeColor="Black" Font-Bold="True">
                    </HeaderStyle>
                    <ControlStyle height="500" width="500" />
                </asp:BoundField>

                <asp:TemplateField HeaderText="Picture" HeaderStyle-BackColor="Silver">
                    <ItemTemplate>
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Image ImageUrl='<%# Eval("Veh_UserUpload") %>' runat="server" CssClass="imgsize1" align="middle" />
                        <headerstyle horizontalalign="Center" />
                       
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:carsconn %>"
        ProviderName="<%$ ConnectionStrings:carsconn.ProviderName %>" SelectCommand="SELECT [Veh_Name], [Veh_Description], [Veh_UserUpload] FROM [Vehicle_UserUploads]">
    </asp:SqlDataSource>
    <br />
</asp:Content>
